package iot.core.data;

import iot.core.util.MyJSON;
import lombok.Data;

import java.io.Serializable;

@Data

public class BaseEntity implements Serializable,Comparable<BaseEntity> {
    private static final long serialVersionUID = 1L;

    private Long id=0L;
    @Override
    public int compareTo(BaseEntity o) {
        return this.getId().compareTo(o.getId());
    }

    @Override
    public  String toString(){
        return MyJSON.toJSONString(this);
    }
}
